<template>
    <div class="box">
        <header class="head">
        <van-nav-bar
        :title="title"
        left-text="返回"
        right-text=""
        left-arrow
        @click-left="back"
        
        />
        </header>
        <div class="mt"></div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            title:null,
        }
        
    },
    props:['navUrl'],
    created(){
        console.log('this.navUrl-------',this.navUrl)
        this.title = this.$router.history.current.meta.title
    },
    methods:{
        //返回上一页
        back(){
            this.$router.push(this.navUrl);
        }
    }
}
</script>
<style lang="less" scoped>
    .head{
        width: 100%;
        position: fixed;
        left: 0;
        top:0;
        z-index: 999;
    }
    .mt{
        padding-top: 1.4rem;
    }
</style>